<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      /*
        constructor 我是哪个类构造出来的 
      */

      class Human {}
      class Person extends Human {}
      const p = new Person(); // Person
      // Person.prototype.constructor = Person
      console.log(p.constructor === Person);
      console.log(p.constructor === Human);
      console.log((123).constructor === Number);
    </script>
  </body>
</html>
